import request from '@/utils/request'

// 获取企业部门列表
export const getDepartmentListRequest = params => request.get('/company/department', { params })

// 新增企业部门
export const addDepartmentListRequest = data => request.post('/company/department', data)

// 获取部门负责人信息 / 获取员工简单列表
export const getDepartmentCaptainRequest = params => request.get('/sys/user/simple', { params })

// 根据 ID 删除部门
export const deleteDepartmentByIdRequest = id => request.delete(`/company/department/${id}`)

// 根据 ID 查询部门详情
export const getDepartmentDetailByIdRequest = id => request.get(`/company/department/${id}`)

// 根据 ID 修改部门详情
export const updateDepartmentDetailByIdRequest = data => request.put(`/company/department/${data.id}`, data)
